package com.cskaoyan.javase.object._5finalize;

import java.util.Scanner;

/**
 * finalize方法仅做了解,该方法没有实际意义
 * @since 15:25
 * @author wuguidong@cskaoyan.onaliyun.com
 */
public class Dem {
    public static void main(String[] args) {
        /*Scanner sc = new Scanner(System.in);
        // 手动是释放系统资源
        sc.close();
        String s = sc.nextLine();*/
        new Student();
        System.gc();
    }
}
class Student{
    @Override
    protected void finalize() throws Throwable {
        System.out.println("模拟系统资源释放！");
    }
}
